package com.spzx.product.api.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.spzx.common.core.web.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Digits;
import lombok.Data;

import java.math.BigDecimal;

@Data
@Schema(description = "商品SKU")
@TableName(value = "product_sku")
public class ProductSku extends BaseEntity {
   @Schema(description = "")
   @TableField(value = "sku_code")
   private String skuCode;
   @Schema(description = "")
   @TableField(value = "Sku_name")
   private String SkuName;
   @Schema(description = "商品ID")
   @TableField(value = "product_id")
   private Long productId;
   @Schema(description = "缩略图路径")
   @TableField(value = "thumb_img")
   private String thumbImg;
   @Schema(description = "售价")
   @TableField(value = "sale_price")
   private BigDecimal salePrice;
   @Schema(description = "成本价")
   @TableField(value = "cost_price")
   private BigDecimal costPrice;
   @Schema(description = "市场价")
   @TableField(value = "market_price")
   private BigDecimal marketPrice;
   @Schema(description = "SKU规格信息")
   @TableField(value = "sku_spec")
   private String skuSpec;
   @Schema(description = "重量")
   @TableField(value = "weight")
   @Digits(integer = 10,fraction = 2)
   private Double weight;
   @Schema(description = "体积")
   @TableField(value = "volume")
   @Digits(integer = 10,fraction = 2)
   private Double volume;

   @Schema(description = "上线状态:0:初始;1:上架;-1:自主下架")
   @TableField(value = "status")
   private Short status;
   @Schema(description = "库存")
   @TableField(exist = false)
   private Integer totalNum;
   @Schema(description = "销量")
   @TableField(exist = false)
   private Integer saleNum;

}
